-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use caddy's certmagic library for extensible/robust ACME handling #14177
Conversation
Codecov Report
@@ Coverage Diff @@
## master #14177 +/- ##
==========================================
+ Coverage 41.85% 41.87% +0.01%
==========================================
Files 745 746 +1
Lines 79816 79827 +11
==========================================
+ Hits 33410 33429 +19
+ Misses 40885 40879 -6
+ Partials 5521 5519 -2
Continue to review full report at Codecov.
|
How would you use it on docker/k8s? |
In k8s you would use cert-manager to request LE certs, but for standard docker installs you'd set it up as before with |
Nevermind, I somehow thought you moved out letsencrypt to other command 😅 |
Signed-off-by: Andrew Thornton <[email protected]>
OK, so this seems great except:
likely other things too in the >400 files changed. Now I think we could reasonably drop modules/log and switch to Zap and consider using the DNS implementation elsewhere for things like libravatar but we should be careful we're not adding way too much code here. |
libdns is a library for working with APIs of various DNS providers (for updating DNS records for the DNS-01 ACME challenge), so not for resolving anything. In terms of adding too much code, I agree. I'd prefer if zap weren't included at all, but most of the other code added is either golang.org/x/net/... and golang.org/x/crypto/... It sucks because technically zap isn't being used at all, as certmagic doesn't log unless it is passed the logger. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we have to approve - it might be reasonable in future to provide a build tag that removes this functionality to reduce and remove these dependencies.
* master: (358 commits) [skip ci] Updated translations via Crowdin Use caddy's certmagic library for extensible/robust ACME handling (go-gitea#14177) Redirect on changed user and org name (go-gitea#11649) chore: bump minio to RELEASE.2021-01-16T02-19-44Z (go-gitea#14445) [skip ci] Updated translations via Crowdin CI: skip build steps for cron update works (go-gitea#14443) [skip ci] Updated licenses and gitignores [skip ci] Updated translations via Crowdin just overload to not get it by mistake again ... (go-gitea#14440) [skip ci] Updated translations via Crowdin Add link to packages in openSUSE build service (go-gitea#14439) Improve Description in new/ edit Project template (go-gitea#14429) Don't show "Reference in new issue" when issues unit is globally disabled (go-gitea#14437) CI: Update license & gitignore by cron (go-gitea#14419) Fix close/reopen with comment (go-gitea#14436) Add german translation guidelines (go-gitea#14283) [skip ci] Updated translations via Crowdin Fix lfs preview bug (go-gitea#14428) [skip ci] Updated translations via Crowdin Bump gsap from 3.5.1 to 3.6.0 (go-gitea#14410) ...
* master: (542 commits) [skip ci] Updated translations via Crowdin Use caddy's certmagic library for extensible/robust ACME handling (go-gitea#14177) Redirect on changed user and org name (go-gitea#11649) chore: bump minio to RELEASE.2021-01-16T02-19-44Z (go-gitea#14445) [skip ci] Updated translations via Crowdin CI: skip build steps for cron update works (go-gitea#14443) [skip ci] Updated licenses and gitignores [skip ci] Updated translations via Crowdin just overload to not get it by mistake again ... (go-gitea#14440) [skip ci] Updated translations via Crowdin Add link to packages in openSUSE build service (go-gitea#14439) Improve Description in new/ edit Project template (go-gitea#14429) Don't show "Reference in new issue" when issues unit is globally disabled (go-gitea#14437) CI: Update license & gitignore by cron (go-gitea#14419) Fix close/reopen with comment (go-gitea#14436) Add german translation guidelines (go-gitea#14283) [skip ci] Updated translations via Crowdin Fix lfs preview bug (go-gitea#14428) [skip ci] Updated translations via Crowdin Bump gsap from 3.5.1 to 3.6.0 (go-gitea#14410) ...
Also bumps minimum required version of go.
By using certmagic we can use the same ACME library that Caddy uses. This also allows us to increase the number of ACME challenges that we can run. This PR adds TLSAPLN challenge, but in a later PR could be extended to use DNS challenges.
Additional things that could be added in a later PR are storing certs using different storage managers (such as minio, or redis).